﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Mvc.Html;

namespace Kooboo.Web.Areas.Commerce.Web.UI
{
    public static class DatePickerExtensions
    {
        public static MvcHtmlString DatePicker(this HtmlHelper html,string name, object value)
        {
      
            string controlid=name;

            string datePickerjs = "<script type='text/javascript'>" +
                                    "$(document).ready(function () {" +
                                    "$('#" + controlid + "').datepicker();" +
                                    "});" +
                                "</script>";
           return MvcHtmlString.Create(html.TextBox(name, value).ToString() +datePickerjs );
        }

    }
}